package com.xtkj.superclub_friendscircle.config;

import com.xtkj.commons.SnowflakeIdWorker;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 项目名称：superclub
 * 类 名 称：WebConfig
 * 类 描 述：
 * 创建时间：2020/1/2 16:36
 * 创 建 人：xiezhiyan
 */
@Configuration
public class WebConfig {


    @Bean
    public SnowflakeIdWorker getSnowflakeIdWorker(){
        return new SnowflakeIdWorker(0,0);
    }

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}